1. Field of the Invention
The present invention relates to a magnetic disc control apparatus and in particular, to a magnetic disc control apparatus having an improved throughput as follows. If an I/O request from a host computer is identified as a sequential I/O, data items in the area to be read by the sequential I/O later is pre-read out and stored in a cache memory, so that the data items in this cache memory are read out with a higher priority than the magnetic disc drive.
2. Description of the Related Art
An I/O pattern successively accessing a continuous recording space of a magnetic disc is called xe2x80x9csequential I/Oxe2x80x9d. The I/O stands for input/output. In the present invention I/O means read access.
In a conventional magnetic disc control apparatus, a plurality of I/O transactions requested from a host computer is identified as a sequential I/O or not. When the I/O is determined to be a sequential I/O, and data items after in a specified area and after are read into a cache memory. After this, when an I/O request is made by the host computer, the cache memory is read with a higher priority, so as to reduce the access frequency of the magnetic disc. This improves the throughput in comparison to a case when the magnetic disc is accessed each time. Here, the sequential I/O is identified as follows. An end address of the preceding I/O is stored and when an I/O having a start address identical to the end address is received, the I/O is determined to be a sequential I/O.
On the other hand, an access pattern of a sequential I/O not completely sequential but has some missing addresses is called xe2x80x9cnear sequential I/Oxe2x80x9d. A system configuration may be such that when the host computer requires a continuous large data item, a technique of index or the like is used eliminating necessity of accessing to all the data items. In this case, a near sequential I/O is generated. In the conventional disc control apparatus, a processing identical to the random I/O has been performed. That is, each time, the magnetic disc drive is accessed. Here, if the near sequential I/O is pre-read like a sequential I/O and data items are stored in the cache memory beforehand, it is considered that throughput can be improved in the same way as the sequential I/O. However, there has been no method for effectively detecting the near sequential I/O.
It is therefore an object of the present invention to provide a magnetic disc control apparatus capable of detecting a near sequential I/O and pre-reading near sequential I/O into a cache memory in the same way as a sequential I/O.
The inventor of this invention has reached the idea of the near sequential I/O detection using the principle shown in FIG. 3.
In FIG. 3, the horizontal axis represents a continuous address space on the magnetic disc, which address space is divided at an identical interval, so as to define identical segments 0 to segment 4. Each of the arrows 11, 12, 13, 14 represents an I/O from the host computer. The ends of each of the arrows represent a transfer start address and a transfer end address. The length of each arrow represents a single I/O transfer length.
Firstly, there is assumed an I/O shown as the arrow 11. Here, the I/O transfer end address belongs to segment number 1, which is used as a key to store the I/O transfer end address of the arrow 11 in the memory table. Next, when the I/O shown by the arrow 12 is requested, the table retrieval is performed using the segment to which the I/O start address belongs. Thus, it is detected that the I/O shown 11 has been present. Here, the transfer end address of the arrow 11 is continuous to the transfer start address of the arrow 12, and accordingly the I/O is determined to be sequential and pre-read is performed as in the conventional method according to the number of occurrences of the sequential I/O.
Explanation will be given on identification of a near sequential I/O. If the I/O shown by the arrow 11 is followed by the I/O shown by the arrow 13, the arrow 11 transfer end address does not match with the arrow 13 transfer start address. However, if the address difference L1 is within a predetermined range, the I/O is identified as a near sequential I/O and pre-read is performed in the same way as the sequential I/O. For example, it is possible to identify a near sequential I/O when the address difference L1 is smaller than the I/O transfer length (length of the arrow 13). In this case, as the I/O shown by arrow 14 is determined to be a random I/O because the address difference L2 is greater than the predetermined range and no pre-read is performed.
A magnetic disc control apparatus according to the present invention is for use in controlling a magnetic disc apparatus including: a magnetic disc drive; and a cache memory from which a data is read out with a higher priority than from the magnetic disc drive. The magnetic disc control apparatus comprises an I/O processor for receiving an I/O request from a host computer, reading out from the cache memory or the magnetic disc drive, a data item corresponding to the I/O request, and passing the data item to the host computer; a near sequential I/O identifying block for deciding, each time an I/O request is entered from the host computer to the I/O processor, whether a current I/O is a near sequential I/O, i.e., the current I/O is near the preceding I/O; and a pre-read executor for pre-reading a data in the magnetic disc drive after a current I/O transfer end address and stores the data in the cache memory if the current I/O is a near sequential I/O.